﻿@using Gx.Common
@{
    ViewBag.Title = ConfigHelper.GetWebConfig("CompanyName");
    Layout = "~/Views/Shared/InfoMaste.cshtml";
}

<script type="text/javascript">
    function UserLogin() {
        var userName = $("#txtUsername").val();
        var userPass = $("#txtPass").val();
        if (userName == "") {
            Helper.Show("用户名不能为空");
            return false;
        }
        if (userPass == "") {
            Helper.Show("密码不能为空");
            return false;
        }
        $.post("/Home/UserLogin", { userName: userName, userPass: userPass }, function (json) {
            if (!json.Success) {
                Helper.Show(json.Msg);
                return false;
            }
            window.location.href = json.Data;
        });
    }


    //屏蔽鼠标右键
    function stop() {
        return false;
    }
    document.oncontextmenu = stop;
</script>

<style type="text/css">
    *
    {
        margin: 0 auto;
    }

    input
    {
        outline: none;
    }

    body
    {
        background: #dfdfdf;
        font-size: 12px;
        background: url(/Content/image/bg.gif) top center #dfdfdf no-repeat;
    }



    .bianju
    {
        margin-bottom: 25px;
    }

        .bianju div
        {
            width: 250px;
            overflow: hidden;
        }
</style>

<div class="login">
    <table width="100%" height="370" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="49%" height="312" valign="bottom"></td>
            <td width="51%" valign="bottom" style="padding-top: 25px">
                <table width="90%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="79%">
                            <div style="margin-bottom: 10px">
                                @*<img src="http://image.wuhanganxiang.com/Content/img/logo0.png" alt="公司Logo" />*@
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="79%">
                            <div style="margin-bottom: 10px">
                                <input class="easyui-textbox" id="txtUsername" style="width: 180px; height: 40px; padding: 12px" data-options="prompt:'用户名',iconCls:'icon-man',iconWidth:38" value="" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="79%">
                            <div style="margin-bottom: 10px">
                                <input class="easyui-textbox" type="password" id="txtPass" style="width: 180px; height: 40px; padding: 12px" data-options="prompt:'密码',iconCls:'icon-lock',iconWidth:38" value="" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="79%">
                            <a href="javascript:" id="btnLogin" class="easyui-linkbutton" style="padding: 5px 0px; width: 180px;" onclick="UserLogin()">
                                <span style="font-size: 14px;">登陆</span>
                            </a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>



<script type="text/javascript" language="javascript">
    document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode == 13) {
            UserLogin();
        }
    };
</script>
